package spoon.sbobet.dao;

import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import spoon.sbobet.domain.GameLink;

@Repository
public class SbobetDaoImpl extends SqlSessionDaoSupport implements SbobetDao {

	@Autowired
	protected void init(SqlSessionFactory sqlSessionFactory) {
		this.setSqlSessionFactory(sqlSessionFactory);
	}

	@Override
	public void delete(GameLink gameLink) {
		getSqlSession().delete("sbobet.delete", gameLink);
	}
	
	@Override
	public Integer addBetting(GameLink gameLink) {
		return getSqlSession().insert("sbobet.insert", gameLink);
	}

}
